import { Controller, Get, Post, Body } from '@nestjs/common';
import { StudentService } from './student.service';
import { Student } from './entities/student.entity';
import { CreateStudentDto } from './dto/create-student.dto';

@Controller('students')
export class StudentController {
  constructor(private readonly studentService: StudentService) {}

  // 创建学生
  @Post("createStudent")
  create(@Body() student: CreateStudentDto) {
    return this.studentService.create(student);
  }
}